package ${basePackageName}.interfaces.frm;

<#if common>
import com.zy.explore.common.interfaces.frm.SortFieldFrm;
<#else>
import ${basePackageName}.interfaces.frm.SortFieldFrm;
</#if>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * description 表(${tableName})的请求参数Frm对象
 *
 * @author ${authorName}
 * @date ${dateTime}
 */
@ApiModel("表(${tableName})实体类查询Frm")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${tableClassNamePrefix}QueryFrm {

<#list tableColumns as column>
    /**
    * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
    */
    <#if column.dataType == 'int' || column.dataType == 'tinyint' || column.dataType == 'smallint' || column.dataType == 'mediumint' || column.dataType == 'bit'>
        <#if column.propName != 'id'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "1")
    private Integer ${column.propName};
        <#else>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
    private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'bigint'>
        <#if column.propName != 'id'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "1")
    private Long ${column.propName};
        <#else>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
    private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'float'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "8.8")
    private Double ${column.propName};
    <#elseif column.dataType == 'date' || column.dataType == 'datetime' || column.dataType == 'time' || column.dataType == 'timestamp'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}起 yyyy-MM-dd HH:mm:ss','TODO 补充字段注释 yyyy-MM-dd HH:mm:ss')}", example = "2021-05-20 00:00:00")
    private String ${column.propName}Begin;

    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}止 yyyy-MM-dd HH:mm:ss','TODO 补充字段注释 yyyy-MM-dd HH:mm:ss')}", example = "2021-05-20 23:59:59")
    private String ${column.propName}End;
    <#elseif column.dataType == 'BigDecimal'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "88.88")
    private BigDecimal ${column.propName};
    <#elseif column.dataType == 'double'>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "88.88")
    private double ${column.propName};
    <#else>
    @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
    private String ${column.propName};
    </#if>

</#list>

    /**
     * 排序字段集合
     */
    @ApiModelProperty("排序字段集合")
    private List<SortFieldFrm> sortFields;

    /**
     * 分页查询参数，页码
     */
    @ApiModelProperty(value = "查询页", example = "1")
    private Integer pageNum;

    /**
     * 分页查询参数，每页数量
     */
    @ApiModelProperty(value = "每页数量", example = "10")
    private Integer pageSize;

}
